<?php
class controller
{
	private static $instance = null;
	
	private $option;
	
	public function __construct()
	{

	}
	
	static public function getIstance()
	{
		if(self::$instance == null)
		{   
	    	$c = __CLASS__;
	     	self::$instance = new $c;
		}
	     
	    return self::$instance;
	}
	
	public function setOption($option)
	{
		$this->option = $option;
	}
	
	public function getOption()
	{
		return $option;
	}
	
	public function readOption()
	{
		return json_encode($this->option);
	}
	
	public function writeOption($option)
	{
		$this->option = json_decode($option);
	}
	
	public function loadPlugin()
	{
		$pluginname = $this->option['NAME'];
	}
}
?>